<!DOCTYPE HTML>
<html>
@include('Admin.Common.header')
<body>
<article class="page-container">
    <form action=""  class="form form-horizontal" id="form-member-add">

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">
                <span class="c-red">*</span>标签名称：
            </label>
            <div class="formControls col-xs-4 col-sm-5">
                <input type="text" class="input-text" id="popular_tagname" name = "popular_tagname" >
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">
                <span class="c-red">*</span>标签url：
            </label>
            <div class="formControls col-xs-4 col-sm-5">
                <input type="text" class="input-text" id="url" name="url">
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-4 col-sm-5 col-xs-offset-4 col-sm-offset-3">
                <button id="subBtn" class="btn btn-primary noradius" type="button">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
            </div>
        </div>

    </form>
</article>

@include('Admin.Common.footer')
<script>
    $(function () {
        $('#subBtn').click(function () {
            var popular_tagname = $('#popular_tagname').val();
            var url = $('#url').val();
            $.post("{{url('addtag')}}", {popular_tagname:popular_tagname, url:url}, function (e) {
                if(e.status)
                {
                    successAlert(e.info);
                    // window.parent.location.reload();
                    setTimeout("window.parent.location.reload();",3000);
                }else {
                    errorAlert(e.info);
                }
            })
            setTimeout("window.location.reload();",3000);
        });
    })

</script>
</body>
</html>